<html>
<head>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<link rel="stylesheet" href="../kindeditor/themes/default/default.css" />
<script charset="utf-8" src="../kindeditor/kindeditor-min.js"></script>
<script charset="utf-8" src="../kindeditor/lang/zh_CN.js"></script>
<script type="text/javascript">
KindEditor.ready(function(K){
K.create('textarea[name="description"]',{
uploadJson : '../upload_json.php',
fileManagerJson : '../file_manager_json.php',
allowFileManager: true,
});
K.create('textarea[name="input"]',{
uploadJson : '../upload_json.php',
fileManagerJson : '../file_manager_json.php',
allowFileManager: true,
});
K.create('textarea[name="output"]',{
uploadJson : '../upload_json.php',
fileManagerJson : '../file_manager_json.php',
allowFileManager: true,
});
K.create('textarea[name="hint"]',{
uploadJson : '../upload_json.php',
fileManagerJson : '../file_manager_json.php',
allowFileManager: true,
});
});

</script>
<title>添加新题目</title>
</head>
<body leftmargin="30" >

<?php require_once("../include/db_info.inc.php");?>
<?php require_once("admin-header.php");
if (!(isset($_SESSION['administrator'])||isset($_SESSION['problem_editor']))){
	echo "<a href='../loginpage.php'>Please Login First!</a>";
	exit(1);
}
?>

<form  class="form-horizontal col-sm-6 col-sm-offset-2" action="problem_add.php" method="post">
<input type=hidden name=problem_id value="New Problem">


<div class="form-group">
        <label class="col-sm-5 control-label">标题</label>
        <div class="col-sm-7">
        <input class="form-control" name="title" type="text" value='<?php echo htmlspecialchars($row->title)?>'/></div>
</div>
<div class="form-group">
        <label class="col-sm-5 control-label">时间限制</label>
        <div class="col-sm-7">
        <input class="form-control" name="time_limit" type="text" value='1'/></div>
</div>
<div class="form-group">
        <label class="col-sm-5 control-label">内存限制</label>
        <div class="col-sm-7">
        <input class="form-control" name="memory_limit" type="text" value='128'/></div>
</div><div class="form-group">
        <label class="col-sm-5 control-label">题目难度</label>
        <div class="col-sm-7">
        <input class="form-control" name="problem_hard" type="text" value='0'/></div>
</div>


<p align=left>问题描述:<br><textarea rows=13 name=description cols=80></textarea></p>

<p align=left>输入提示:<br><textarea rows=13 name=input cols=80></textarea></p>

<p align=left>输出提示:<br><textarea rows=13 name=output cols=80></textarea></p>

<p align=left>Sample Input:<br><textarea  class="input input-xxlarge"  rows=6 name=sample_input cols=80></textarea></p>
<p align=left>Sample Output:<br><textarea  class="input input-xxlarge"  rows=6 name=sample_output cols=80></textarea></p>
<p align=left>提示:<br><textarea rows=13 name=hint cols=80></textarea></p>

<p>特殊评测: N<input type=radio name=spj value='0' checked>Y<input type=radio name=spj value='1'></p>
<div class="form-group">
	<label class="col-sm-5 control-label">题库</label>
	<div class="col-sm-7">
	<select class="form-control" name="class">
       <option value="0">主题库</option>
       <option value="1">Begin题库</option>
       <option value="2">比赛题库</option>
    </select>
	</div>
</div>

<div align=center>
<?php require_once("../include/set_post_key.php");?>
<div class="form-group">
        <div class="col-sm-offset-5 col-sm-7">
            <input type="submit" class="btn btn-primary col-sm-8" data-loading-text="正在提交……" value="提交"/>
        </div>
</div>
</div>
</form>
</body></html>

